
"use strict";

var __importDefault =
  (this && this.__importDefault) ||
  function (mod) {
    return mod && mod.__esModule
      ? mod
      : {
          default: mod,
        };
  };

exports.__esModule = true;
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var request_1 = require("../../utils/request");

var globalData_1 = require("../../globalData");
// console.log("globalData_1-----------------------------",globalData_1);

var marketingRequest = new request_1["default"]({
  ApiUrl: globalData_1["default"].marketingUrl,
});
//日常任务列表查询
exports.getDailyTasksList = function (params) {
  return marketingRequest.getRequest({
    url: "system/mts/square/dailyTasksList",
    data: params,
  });
};
// 专属任务列表查询
exports.getExclusiveTasksList = function (params) {
    return marketingRequest.getRequest({
        url: 'system/mts/square/exclusiveTasksList',
        data: params
    });
}; 
// 限时任务列表查询
exports.getTimedTasksList = function (params) {
    return marketingRequest.getRequest({
        url: 'system/mts/square/timedTaskList',
        data: params
    });
}; 

// 领取任务奖励
exports.getAward = function (taskId) {
    return marketingRequest.getRequest({
        url: `system/mts/square/claimRewards/${taskId}`,
        data: {}
    });
}; 
// 成长等级会员等级 
exports.getUserGrowthle = function (params) {
    return marketingRequest.postRequest({
        url: 'app/growthle/user/get/info',
        data: params
    });
}; 
// 成长等级会员规则
exports.getGrowthCenterInfoList = function (params) {
    return marketingRequest.postRequest({
        url: 'app/growthle/user/growthCenterInfo',
        data: params
    });
}; 
// 成长等级会员详情
exports.getGrowthleById = function (id) {
    return marketingRequest.getRequest({
        url: `app/growthle/user/getGrowthById/${id}`,
        data: {}
    });
}; 
// 签到记录
exports.appUserSignInRecord = function (id) {
    return marketingRequest.getRequest({
        url: `system/mts/square/appUserSignIn`,
        data: {}
    });
}; 
// 签到
exports.userSignin = function (data) {
    return marketingRequest.postRequest({
        url: `system/mts/square/signin`,
        data: data
    });
}; 

// 付费会员-未开通会员或者续费会员,支付成功后调用
exports.payleRule = function (data) {
    return marketingRequest.postRequest({
        url: `app/payle/rule/user/add/order/with/race`,
        data: data
    });
}; 

// 付费会员-支付前调用
exports.verifyPayStatus = function (data) {
    return marketingRequest.postRequest({
        url: `system/vip/settings/verifyPayStatus`,
        data: data
    });
}; 

// 付费会员-已购会员-购买记录
exports.menberBuylist = function (data) {
    return marketingRequest.getRequest({
        url: `system/vip/settings/order/list`,
        data: data
    });
}; 

//所有会员名称和对应id列表
exports.noVipDetail = function () {
    return marketingRequest.getRequest({
        url: `system/vip/settings/list`,
        data: {
			sellerId: globalData_1.default.sellerId
		}
    });
}; 
//未开通-通过会员id查对应会员规则
exports.vipInfos= function (id) {
    return marketingRequest.getRequest({
        url: `system/vip/settings/${id}`,
        data: {}
    });
}; 
//已开通-通过会员id查对应会员规则
exports.hasvipInfos= function (id) {
    return marketingRequest.getRequest({
        url: `system/vip/settings/equityCenterById/${id}`,
        data: {}
    });
}; 

// 我的-新增付费会员栏和已开通付费信息展示
exports.myVipDetail = function () {
    return marketingRequest.getRequest({
        url: `system/vip/settings/openVipList`,
        data:{}
    });
}; 
// 我的-新增付费会员栏和已开通付费信息展示
exports.cardCouponNumQuery = function (memberType) {
    return marketingRequest.postRequest({
        url: `system/vip/settings/cardCouponNumQuery/${memberType}`
    });
}; 

//记录开通
exports.saveBuy = function (data) {
    return marketingRequest.postRequest({
        url: `system/vip/settings/saveSnapshot`,
        data:data
    });
}; 
//取消记录开通
exports.deleteSaveBuy = function (data) {
    return marketingRequest.deleteRequest({
        url: `system/vip/settings/cannalSnapshot`,
        data:data
    });
}; 

//积分明细列表
exports.integralList = function () {
    return marketingRequest.getRequest({
        url: `app/user/integral/inout/pointsList`,
        data:{}
    });
}; 

//积分明细列表2.0
exports.integralListV2 = function () {
    return marketingRequest.getRequest({
        url: `app/user/integral/inout/pointsList/v2`,
        data:{}
    });
};

//积分详情
exports.integralDetail = function (params) {
    return marketingRequest.postRequest({
        url: `app/user/integral/inout`,
        data:params
    });
}; 



// 充电积分兑换比例规则
exports.getGradeRuleSetting = function () {
    return marketingRequest.getRequest({
        url: 'app/growthle/bscrule/setting/1',
    });
};

